package com.dupengcheng.wx.entity;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum MessageTypeEnum {

    SUBSCRIBE("event.subscribe","用户关注事件"),
    TEXT("text","用户发送消息事件");
    private String msgType;
    private String desc;


    public static MessageTypeEnum getByType(String msgType){

        for (MessageTypeEnum value : MessageTypeEnum.values()) {

            if (value.getMsgType().equals(msgType)){
                return value;
            }
        }

        return null;

    }




}
